<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <title>{$webData['title']|default="后台管理"}</title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="msapplication-tap-highlight" content="no">
    <!--<meta itemprop="image" content="__STATIC__/images/touch-icon-iphone-retina.png">-->


    <!--<link rel="apple-touch-icon" href="__STATIC__/images/touch-icon-iphone.png">
    <link rel="apple-touch-icon" sizes="76x76" href="__STATIC__/images/touch-icon-ipad.png">
    <link rel="apple-touch-icon" sizes="120x120" href="__STATIC__/images/touch-icon-iphone-retina.png">
    <link rel="apple-touch-icon" sizes="152x152" href="__STATIC__/images/touch-icon-ipad-retina.png">-->

    <!--<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
    <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">-->

    <!--<link rel="icon" href="http://img.xiaoxiao2.top/favicon.ico">-->
    <link rel="icon" href="/favicon.ico">
    <link rel="stylesheet" href="__STATIC__/css/app.min.css">

    <script>
        var dataDelIds = [];
    </script>
    <script src="__STATIC__/js/app.min.js"></script>
    <script src="__PLUGINS__/layer/layer.js"></script>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    {if $Think.session.error_message}
    <script>
        layer.msg('{$Think.session.error_message}',{icon:2});
    </script>
    {/if}
    {if $Think.session.success_message}
    <script>
        layer.msg('{$Think.session.success_message}',{icon:1});
    </script>
    {/if}
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <header class="main-header">
        <a class="logo">
            <span class="logo-mini"><b>{$webData['backend_name']|default=''}</b>后台</span>
            <span class="logo-lg"><b>{$webData['backend_name']|default=''}</b>管理后台</span>
        </a>
        <nav class="navbar navbar-static-top">
            <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">切换导航</span>
            </a>
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="{$webData['user_info']['avatar']}" class="user-image"
                                 alt="User Image">
                            <span class="hidden-xs">{$webData['user_info']['nickname']}</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="user-header">
                                <img src="{$webData['user_info']['avatar']}" class="img-circle"
                                     alt="User Image">
                                <p>
                                    {$webData['user_info']['nickname']}
                                    <small>{$webData['user_info']['name']}</small>
                                </p>
                            </li>
                            <li class="user-body">
                                <div class="row">
                                    <div class="col-xs-4 text-center">
                                        <a href="#"></a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#"></a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#"></a>
                                    </div>
                                </div>
                            </li>
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="{:url('admin_user/profile')}" class="btn btn-default btn-flat">个人资料</a>
                                </div>
                                <div class="pull-right">
                                    <a href="{:url('auth/logout')}" class="btn btn-default btn-flat">退出</a>
                                </div>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <aside class="main-sidebar">
        <section class="sidebar">
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="{$webData['user_info']['avatar']}" class="img-circle" alt="User Image">
                </div>
                <div class="pull-left info">
                    <p>{if!empty($user_info.name)}{$user_info.name}{/if}</p>
                    <a><i class="fa fa-circle text-success"></i> 正常</a>
                </div>
            </div>

            <ul class="sidebar-menu">
                {$webData['left_menu']}
            </ul>
        </section>
    </aside>
    <div class="content-wrapper">
        <section class="content-header">
            <h1>
                {$webData['title']}
            </h1>
            <ol class="breadcrumb">
                {if isset($webData['current_nav']) && !empty($webData['current_nav'])}
                <li><a href="{:url('admin/index/index')}"><i class="fa fa-home"></i> 主页</a></li>
                {$webData['current_nav']}
                {/if}
            </ol>
        </section>
        <section class="content">
            [__REPLACE__]
        </section>
    </div>

    <!--删除操作modal-->
    <div class="modal fade" id="modal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span></button>
                    <h4 class="modal-title">提示</h4>
                </div>
                <div class="modal-body">
                    <p id="modal_message">您确认执行本次操作吗？</p>
                    <input name="modal_do_url" id="modal_do_url" value="" placeholder="modal_do_url" type="hidden">
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
                    <button onclick="modal_do()" type="button" class="btn btn-primary">确认</button>
                </div>
            </div>
        </div>
    </div>
    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>V</b> 1.0
        </div>
        <strong>Copyright &copy; 2019 <a></a>.</strong> 百货
    </footer>
    <aside class="control-sidebar control-sidebar-dark">
        <div class="tab-content">
            <div class="tab-pane" id="control-sidebar-home-tab">
            </div>
        </div>
    </aside>
    <div class="control-sidebar-bg"></div>
</div>
</body>
</html>
<!--<script src="__STATIC__/js/demo.js"></script>-->
<script>
    $(function () {
        $('#sidebar-form').on('submit', function (e) {
            e.preventDefault();
        });

        $('.sidebar-menu li.active').data('lte.pushmenu.active', true);

        $('#search-input').on('keyup', function () {
            var term = $('#search-input').val().trim();

            if (term.length === 0) {
                $('.sidebar-menu li').each(function () {
                    $(this).show(0);
                    $(this).removeClass('active');
                    if ($(this).data('lte.pushmenu.active')) {
                        $(this).addClass('active');
                    }
                });
                return;
            }

            $('.sidebar-menu li').each(function () {
                if ($(this).text().toLowerCase().indexOf(term.toLowerCase()) === -1) {
                    $(this).hide(0);
                    $(this).removeClass('pushmenu-search-found', false);

                    if ($(this).is('.treeview')) {
                        $(this).removeClass('active');
                    }
                } else {
                    $(this).show(0);
                    $(this).addClass('pushmenu-search-found');

                    if ($(this).is('.treeview')) {
                        $(this).addClass('active');
                    }

                    var parent = $(this).parents('li').first();
                    if (parent.is('.treeview')) {
                        parent.show(0);
                    }
                }

                if ($(this).is('.header')) {
                    $(this).show();
                }
            });

            $('.sidebar-menu li.pushmenu-search-found.treeview').each(function () {
                $(this).find('.pushmenu-search-found').show(0);
            });
        });
    });
</script>
